Microcomputer and evaluation device, evaluation method thereof

ABSTRACT

A microcomputer which outputs address data to an external device for evaluating the address data comprising an address counter specifying an address of a program memory, an address data output section for outputting the address data in the address counter to the external device by use of a clock having a higher frequency provided from the external device than a clock for operating the microcomputer while applying a unit based on a bit number smaller than a bit number of the address data in the address counter.

CROSS-REFERENCE RELATED TO APPLICATIONS

The present application claims priority upon Japanese Patent Application No. 2002-36635 filed on Dec. 18, 2002, which is herein incorporated by reference.

NOTICE OF COPYRIGHTS AND TRADE DRESS

A portion of the disclosure of this patent document contains material which is subject to copyright protection. This patent document may show and/or describe matter which is or may become trade dress of the owner. The copyright and trade dress owner has no objection to the facsimile reproduction by any one of the patent disclosure as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright and trade dress rights whatsoever.

BACKGROUND OF THE INVENTION

1. Field Of The Invention

The present invention relates to a microcomputer and an evaluation device/method thereof.

2. Description Of Related Art

A one-chip microcomputer is obtained as below. Specifically, a ROM (program memory), a RAM, a CPU and a peripheral circuit are integrated on a single semiconductor chip and this semiconductor chip is fixed on a substrate. Thereafter, an input/output port (peripheral circuit) formed on this semiconductor chip is connected to an external pin by wire bonding and the substrate having this semiconductor chip is covered with a resin member (insulating member) in a state where the external pin is exposed. Moreover, in some recent one-chip microcomputers, there is one in which, in consideration of time required for storing software in a ROM, manufacturing costs and the like, a nonvolatile memory (for example, an EEPROM) in which data can be electrically rewritten is integrated in place of a mask ROM.

In the meantime, data stored in the ROM of the one-chip microcomputer (for example, program data, table data and the like) are different according to an object to be controlled, which is controlled by the one-chip microcomputer. Thus, when the one-chip microcomputer has the above nonvolatile memory as the ROM, the data stored in the ROM are rewritten by use of data evaluated by a debugging tool (evaluation device) every time a type of the controlled body is changed.

Here, the debugging tool is a device which is connected to the one-chip microcomputer and reads in real time changes of address data in an address counter for specifying the addresses in the ROM, operation data based on program data in the ROM, and the like. Thus, the debugging tool evaluates validity of the program data. In such a manner, the data stored in the ROM can be rewritten and corrected.

Note that a technology related to the debugging tool is disclosed, for example, in Japanese Patent Application Laid-open Publication No. Hei11 (1999)-282713

However, recently, in some of the one-chip microcomputers, an arithmetic processing speed thereof is increased to several hundred MHz. Thus, the conventional debugging tool cannot read changes of the address data, operation data and the like in real time. Consequently, there has been a problem that the data cannot be evaluated correctly.

Moreover, a package of the one-chip microcomputer, which is covered with the resin member, is miniaturized in consideration of a case where the package is built into small-sized equipments (for example, a digital camera and a portable telephone). Along with this miniaturization, a distance between the external pins is made extremely narrow. Thus, it is becoming physically impossible to read the address data, operation data, and the like by use of the conventional debugging tool. Consequently, similarly to the above case, there has been a problem that the data cannot be evaluated correctly.

SUMMARY OF THE INVENTION

One aspect of the present invention is a microcomputer which outputs address data to an external device for evaluating the address data comprising an address counter specifying an address of a program memory, an address data output section for outputting the address data in the address counter to the external device by use of a clock having a higher frequency provided from the external device than a clock for operating the microcomputer while applying a unit based on a bit number smaller than a bit number of the address data in the address counter.

Features and objects of the present invention other than the above will become clear by reading the description of the present specification with reference to the accompanying drawings.

DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following description taken in conjunction with the accompanying drawings wherein:

FIG. 1 is a block diagram showing a schematic configuration of a microcomputer and a microcomputer evaluation device of the present invention; and

FIG. 2 is a block diagram showing internal components of the microcomputer of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Outline of Disclosure

At least the following matters will be made clear by the explanation in the present specification and the description of the accompanying drawings.

A microcomputer which outputs address data to an external device for evaluating the address data comprising an address counter specifying an address of a program memory, and an address data output section for outputting the address data in the address counter to the external device by use of a clock having a higher frequency provided from the external device than a clock for operating the microcomputer while applying a unit based on a bit number smaller than a bit number of the address data in the address counter.

According to the microcomputer described above, the address data can be outputted to the external device by providing a port for inputting the clock from the external device and minimum ports for outputting the address data in the address counter. For example, if the present invention is applied to a microcomputer for mass production, which has a program memory in which data can be electrically rewritten, it is made possible to obtain correct rewritten data for the program memory based on an evaluation result of the address data in the external device every time an object to be controlled is changed.

Moreover, in the microcomputer, the address data output section may output the address data in the address counter as serial data.

According to the microcomputer described above, only two ports may be provided, including the port for inputting the clock from the external device and the port for outputting the address data in the address counter.

Moreover, in the microcomputer, the address data output section may output the address data in the address counter by splitting the address data into a plurality of pieces.

According to the microcomputer described above, compared to the case where the address data in the address counter is outputted as the serial data, a frequency of the clock supplied from the external device can be lowered.

A microcomputer evaluation device for reading address data in an address counter out of a microcomputer having the address counter for designating an address in a program memory. Here, the microcomputer evaluation device includes an address data obtaining section for reading the address data in the address counter by use of a clock having a higher frequency than a clock for operating the microcomputer while applying a unit based on a bit number smaller than a bit number of the address data in the address counter.

According to the above-described evaluation device of a microcomputer, the device is specialized in evaluating the address data in the address counter included in the microcomputer. Thus, even if the arithmetic processing speed of the microcomputer is fast, the address data in the address counter can be read in real time and evaluated correctly. Moreover, the number of connection lines with the microcomputer is small. Thus, even if the microcomputer itself is miniaturized, the address data in the address counter can be read in real time and evaluated correctly.

Furthermore, in the microcomputer evaluation device, the address data obtaining section can further include a storage section for sequentially storing the address data which are read out.

According to the microcomputer evaluation device described above, it is possible to evaluate a change in the address data based on the address data which are stored in the storage section.

Moreover, in the microcomputer evaluation device, the storage section may be configured to sequentially store the address data which are read out until the address data obtaining section outputs a stop signal for stopping an operation of the microcomputer.

According to the microcomputer evaluation device described above, it is possible to evaluate the change of the address data intermittently based on the address data stored in the storage section every time when the microcomputer stops the operation.

Overall Configuration

With reference to FIG. 1, an overall schematic configuration according to an aspect of the present invention will be described. FIG. 1 is a block diagram showing schematic configurations of a microcomputer and an evaluation device thereof according to an aspect of the present invention. Note that the microcomputer is assumed to be a mass-produced microcomputer which has a program memory capable of electrically rewriting data.

In FIG. 1, the microcomputer 2 includes a program counter 4 (an address counter) and a bit width conversion circuit 6 (an address data output section).

The program counter 4 specifies an address of a program memory (not shown) of the microcomputer, and address data of predetermined binary values is set in the program counter 4.

The bit width conversion circuit 6 outputs the address data in the program counter 4 while applying a unit based on a bit number smaller than that of the address data in the program counter 4. For example, the bit width conversion circuit 6 may be a parallel-serial conversion circuit. Specifically, the address data in the program counter 4 is inputted in parallel to the bit width conversion circuit 6 and this address data is serially outputted therefrom. Moreover, the bit width conversion circuit 6 may be a circuit which splits the address data (n bits) of the program counter 4 into a plurality of pieces (m: m<n). To be more specific, the address data in the program counter 4 is inputted in parallel to the bit width conversion circuit 6 and this address data is sequentially outputted in parallel therefrom while being split into m pieces of data by n/m bit. The address data obtained from this bit width conversion circuit 6 is supplied to a debugging tool for evaluating the address data, which will be described later. Note that a plurality of pieces of address data are continuously outputted from the bit width conversion circuit 6. Thus, the bit width conversion circuit 6 affixes the start bit, for example, a logical value “0”, to each address data upon output so as to discriminate each address data.

A debugging tool 8 (an external device or an evaluation device) is for evaluating the address data supplied from the bit width conversion circuit 6 of the microcomputer 2. The debugging tool 8 includes a controller 10 and a storage section 12. Note that the controller 10 and the storage section 12 constitute an address data obtaining section as claimed.

The controller 10 generates a clock for the bit width conversion circuit 6 to output the address data and controls write and read of the storage section 12. Values of the address data set in the program counter 4 are incremented or changed to predetermined address data in synchronization with a system clock for operating the microcomputer 2. Thus, the controller 10 supplies, to the bit width conversion circuit 6, a clock having a higher frequency than that of the system clock for operating the microcomputer 2.

As an example, it is assumed that the system clock for operating the microcomputer 2 is 1 MHz and the bit width conversion circuit 6 is a parallel-serial conversion circuit which converts 16-bit address data (note, however, that the most significant bit MSB is a start bit) from parallel to serial. In this case, the controller 10 has to take in the address data in the program counter 4 before this address data is changed. Thus, the controller 10 supplies a 16 MHz clock to the bit width conversion circuit 6. Consequently, the bit width conversion circuit 6 outputs 16-bit address data serially in synchronization with the 16 MHz clock and while surely following the change in the address data in the program counter 4.

Moreover, as another example, it is assumed that the system clock for operating the microcomputer 2 is 1 MHz and the bit width conversion circuit 6 is a circuit which splits the 16-bit address data A15 to A0 (note, however, that the most significant bit A15 is a start bit) by 4 bits into A15 to A12, A11 to A8, A7 to A4 and A3 to A0. In this case, the controller 10 has to take in the address data in the program counter 4 before this address data is changed. Thus, the controller 10 supplies a 4 MHz clock to the bit width conversion circuit 6. Consequently, the bit width conversion circuit 6 outputs the address data in parallel in the order of the 4-bit data A15 to A12, A11 to A8, A7 to A4 and A3 to A0 in synchronization with the 4 MHz clock and while surely following the change in the address data in the program counter 4.

The storage section 12 stores the address data obtained from the bit width conversion circuit 6 sequentially. Here, the controller 10 controls write of the storage section 12 by receiving the start bit of the address data obtained from the bit width conversion circuit 6. Thus, the storage section 12 sequentially stores the address data, which is obtained from the bit width conversion circuit 6 in such a manner as the example described above, in the respective addresses specified by the controller 10. Note that, as the storage section 12, a volatile memory such as a SRAM and a DRAM, a nonvolatile memory such as an EPROM and an EEPROM, a hard disk or the like can be used. However, as the storage section 12, any memory devices other than those described above can be used as long as the memory device can surely store the address data obtained from the bit width conversion circuit 6.

Here, the controller 10 supplies, to the microcomputer 2, a start signal for starting the operation of the microcomputer 2 and a stop signal for stopping the operation of the microcomputer 2. Accordingly, the controller 10 appropriately controls an operation period of the microcomputer 2. Thus, in the controller 10, during a period when the operation of the microcomputer 2 is stopped, the address data so far stored in the storage section 12 is read and the data in the program memory can be continually or intermittently evaluated based on the change in the address data.

Configuration of Microcomputer

Next, with reference to FIG. 2, the microcomputer according to the present invention will be described. FIG. 2 is a block diagram showing internal components of the microcomputer according to an aspect of the present invention. Note that the same components as those of FIG. 1 will be denoted by the same numbers.

In FIG. 2, a plurality of internal components are connected to each other via an internal bus 14. Note that the internal bus 14 has an address bus and a data bus. However, the address bus and the data bus may be separated from each other.

First, in a ROM 16 (program memory), program data for the microcomputer 2 to appropriately execute arithmetic processing, table data referred to when the microcomputer 2 appropriately executes the arithmetic processing, and the like have been previously stored. Note that, in this embodiment, it is preferable that the ROM 16 is an EEPROM (including a flash ROM) or an EPROM, as a nonvolatile memory in which data can be rewritten. For example, the microcomputer 2 having a built-in EPROM is made available as a mass-produced product by providing therein a window section for irradiation of ultraviolet rays by removing a part of the resin member on the semiconductor chip.

The program counter 4 will be described in detail. The program counter 4 specifies an address, in which the program data or table data for executing the arithmetic processing is stored, among all addresses of the ROM 16. In the program counter 4, address data, pointing to where the program data for initializing the microcomputer 2 has been stored in the ROM 16, is preset when the microcomputer 2 is turned on. Thereafter, the address data in the program counter 4 is incremented by +1 in timing of the system clock or is changed (jumps) to predetermined address data according to a result of decoding of the program data read from the ROM 16 or an interrupt request. Thus, an address of the ROM 16 is specified by the program counter 4 and program data stored in this address or table data stored therein is read.

An instruction register 18 temporarily retains the program data read from the ROM 16 in timing of the system clock. An instruction decoder 20 decodes the program data (binary data) outputted from the instruction register 18 by use of a PLA (programmable logic array) and outputs a control signal for executing arithmetic processing.

A RAM 22 writes and reads data related to the arithmetic processing. Note that, in this embodiment, it is preferable that a volatile memory such as a SRAM, in which the data related to the arithmetic processing can be efficiently rewritten, is used as the RAM 22.

An ALU 24 (arithmetic and logic unit) includes two inputs and one output. The ALU 24 performs arithmetic processing of two input data in accordance with the result of decoding of the program data read from the ROM 16 and transfers output data obtained here to the internal bus 14. According to need, the ALU 24 supplies the output data to one of the inputs and executes the arithmetic processing again.

An accumulator 26 and a register group 28 temporarily retain data related to arithmetic processing such as the output data obtained from the ALU 24.

A stack pointer 30 retains address data in the ROM 16, the address data pointing to where a current program routine returns, when moving to a program routine different from the current program routine in accordance with predetermined interrupt processing. Note that, when the microcomputer 2 can execute multiple interrupt processing, the stack pointer 30 has the number of hierarchies corresponding to the number of the multiple interrupt processing.

An oscillation circuit 32 generates an oscillation clock to be a base of a system clock for driving the internal components of the microcomputer 2. In this embodiment, the oscillation circuit 32 is assumed to be a free-running type which generates an oscillation frequency by itself. For example, as the oscillation circuit 32, a ceramic oscillation circuit having a natural oscillator, a crystal oscillation circuit, an RC oscillation circuit and the like are applicable. Note that, instead of the oscillation circuit 32, it is also possible to supply an external clock as the oscillation clock.

A clock generator 34 splits the oscillation clock generated by the oscillation circuit 32 into a predetermined number and generates the system clock for driving the internal components of the microcomputer 2.

A timer 36 clocks a one second signal, which is obtained by splitting the oscillation clock into the predetermined number by the clock generator 34, and transfers a clocking output to the internal bus 14. Note that the timer 36 is reset and performs clocking in accordance with the control signal obtained from the instruction decoder 20.

An interrupt controller 38 generates an interrupt request for executing a program routine different from a current program routine. For example, upon receipt of a clocking change per second in the timer 36, the interrupt controller 38 generates a timer interrupt request. In this event, the ALU 24 executes only arithmetic processing of increments, carries and the like of date, hour, minute and second of a clock, for example, in accordance with the result of decoding of the program data read from the ROM 16. Moreover, the interrupt controller 38 generates an external interrupt request when a predetermined external signal is supplied to an interrupt input terminal (not shown) of the microcomputer 2. In this event, the ALU 24 executes only arithmetic processing requested by the external signal, in accordance with the result of decoding of the program data read from the ROM 16. Moreover, when a signal indicating abnormality of the microcomputer 2 is supplied from a watch dog timer 40, the interrupt controller 38 controls a standby controller 42 and stops the current arithmetic processing to set a standby mode. Note that the interrupt request is not limited to the one described above. For example, it is also possible to generate an interrupt request when an arithmetic result of the ALU 24 becomes a predetermined value.

A serial input/output port 44 and input/output ports 46, 48, 50 and 52 serve as an interface between the microcomputer 2 and the external device (in this embodiment, the debugging tool 8). The input/output ports are connected to the internal bus 14 on one ends thereof and are connected to external pins (not shown) on the other ends thereof.

An input/output port 54 serves as an interface between the microcomputer 2 and the debugging tool 8. The input/output port 54 is connected to an external pin (not shown) on one end thereof and is connected to clock input and data output of the bit width conversion circuit 6 on the other end thereof. Specifically, a clock for the bit width conversion circuit 6 to output address data is inputted to the bit width conversion circuit 6 via the input/output port 54 from the controller 10.

Operations of Microcomputer and Debugging Tool

First, the controller 10 of the debugging tool 8 outputs a start signal for starting the operation of the microcomputer 2 and supplies the signal to the interrupt input terminal of the microcomputer 2. Thus, upon receipt of an external interrupt request corresponding to the start signal, the microcomputer 2 decodes the program data in the ROM 16 and performs the arithmetic processing. At the same time, the microcomputer 2 moves to a standby mode for outputting address data in the program counter 4 at the time to the debugging tool 8.

Thereafter, the controller 10 of the debugging tool 8 outputs a clock having a higher frequency than that of a system clock for operating the microcomputer and supplies the clock to the input/output port 54 of the microcomputer 2. Note that a relationship between the frequency of the system clock of the microcomputer and the frequency of the above-described clock is as described above.

Accordingly, the microcomputer 2 performs the arithmetic processing by decoding the program data in the ROM 16 and outputs the address data in the program counter 4 at the time to the debugging tool 8. For example, when the bit width conversion circuit 6 is a parallel-serial conversion circuit, address data having a start bit attached thereto is outputted serially to the debugging tool 8 via the input/output port 54 from the bit width conversion circuit 6 and is continuously stored in the storage section 12. Moreover, when the bit width conversion circuit 6 is a circuit which splits address data into a plurality of pieces, address data having a start bit attached thereto is sequentially outputted in parallel via the input/output port 54 from the bit width conversion circuit 6 after being split into a plurality of pieces and is continuously stored in the storage section 12. Note that the input/output port 54 as many as the number of bits, which enables input of clocks and output of address data (when the address data is split into a plurality of pieces, the number of bits of the respective data after division), may be previously provided.

Thereafter, if necessary, the controller 10 of the debugging tool 8 outputs a stop signal which allow the microcomputer 2 to stop its operation and supplies it to the interrupt input of the microcomputer 2. In the meantime, the clock output is stopped at the controller 10.

In such a manner, the address data in the program counter 4 is sequentially stored in the storage section 12 of the debugging tool 8 in real time in synchronism with the operation of the microcomputer 2. The debugging tool 8 is specialized in evaluating the address data in the program counter 4. Thus, even if the arithmetic processing speed of the microcomputer 2 is fast, it is possible to evaluate the address data in the program counter 4 correctly. Moreover, between the microcomputer 2 and the debugging tool 8, only connection lines for the start signal, the stop signal, the clocks and the address data may be provided. Thus, even if the microcomputer 2 itself is miniaturized, it is possible to evaluate the address data in the program counter 4 correctly.

Other Embodiments

Although the preferred embodiments of the microcomputer and the microcomputer evaluation device of the present invention have been described above, it should be noted that the above-described embodiments are for the purpose of facilitating the understanding of the present invention only, and that the present invention shall not be limited to the embodiments described herein. It is needless to say that various modifications and improvements are possible without departing from the scope of the present invention, and that the present invention encompasses all equivalents thereto.

Storage Section

Although the embodiments have been described on the premise that all the address data in the program counter 4 during the operation of the microcomputer 2 are stored in the storage section 12 in real time, the present invention is not limited to the foregoing. For example, it is also possible to configure the storage section 12 to store part of the address data in the program counter 4 by appropriately selecting the clock frequency to be supplied from the controller 10 to the bit width conversion circuit 6. In this way, it is possible to evaluate the change of the address data when the program data in the ROM 16 do not include many branch instructions. At this time, the clock frequency becomes lower than the case of storing all the address data in the program counter 4 in the storage section 12. Accordingly, reading of the address data from the bit width conversion circuit 6 to the storage section 12 becomes more reliable.

Address Data

Although the embodiments have been described on the premise that the start bit is attached to the uppermost position of each piece of the address data for the purpose of detecting sections among the plurality of pieces of the address data, the present invention is not limited to the foregoing. For example, it is also possible to attach a detection bit similar to the start bit in the lowermost position of each piece of the address data, or in a given position in a middle bit thereof.

Microcomputer

Although the embodiments have been described on the premise that the microcomputer 2 is the mass production item including the memory in which data can be electrically rewritten, the present invention is not limited to the foregoing. For example, the microcomputer 2 may be a microcomputer for an evaluation purpose which is used prior to mass production of a microcomputer including a mask ROM or a one-time EPROM or the like.

According to the present invention, it is possible to read the address data in the address counter in real time and to evaluate the address data correctly even when the arithmetic processing speed of the microcomputer is high and when the microcomputer as such is miniaturized.

Although the preferred embodiment of the present invention has been described in detail, it should be understood that various changes, substitutions and alterations can be made therein without departing from spirit and scope of the inventions as defined by the appended claims. 

1. A microcomputer which outputs address data to an external device for evaluating said address data comprising: an address counter specifying an address of a program memory; an address data output section for outputting said address data in said address counter to said external device by use of a clock having a higher frequency provided from said external device than a clock for operating said microcomputer while applying a unit based on a bit number smaller than a bit number of said address data in said address counter.
 2. The microcomputer according to claim 1, wherein said address data output section outputs said address data in said address counter as serial data.
 3. The microcomputer according to claim 1, wherein said address data output section outputs said address data in said address counter while splitting said address data into a plurality of pieces.
 4. An evaluation device of a microcomputer, which reads address data in an address counter specifying an address of a program memory from a microcomputer having said address counter, comprising: an address data obtaining section for reading said address data in said address counter by use of a clock having a higher frequency than a clock for operating said microcomputer while applying a unit based on a bit number smaller than a bit number of said address data in said address counter.
 5. The microcomputer evaluation device according to claim 4, wherein said address data obtaining section further includes a storage section for sequentially storing said address data which are read out.
 6. The microcomputer evaluation device according to claim 5, wherein said storage section sequentially stores said address data which are read out until said address data obtaining section outputs a stop signal for stopping an operation of said microcomputer.
 7. A method of evaluating a microcomputer comprising: reading address data in an address counter specifying an address of a program memory from a microcomputer by use of a clock having a higher frequency than a clock for operating said microcomputer while applying a unit based on a bit number smaller than a bit number of said address data in said address counter.
 8. The method of evaluating a microcomputer according to claim 7 comprising sequentially storing said address data which are read out.
 9. The method of evaluating a microcomputer according to claim 8 comprising sequentially storing said address data which are read out until a stop signal for stopping an operation of said microcomputer is outputted. 